package com.sudo.service.admin.service;

import com.sudo.common.enums.SysUserSource;
import com.sudo.common.utils.PagedGridResult;
import com.sudo.dao.admin.entity.SysUser;
import com.sudo.dao.admin.model.bo.SimpleUserBO;
import com.sudo.dao.admin.model.bo.SysUserBasicInfoBO;
import com.sudo.dao.admin.model.bo.sysconfig.SysUserRegistDTO;
import com.sudo.dao.admin.model.vo.SysSimpleUserVO;
import com.sudo.dao.admin.model.vo.SysUserReVO;

import java.util.List;

public interface SysUserService {

    SysUserReVO getSysUserAndRoleByUsername(String username);

    /**
     * 通过用户名查询用户基础信息
     */
    SysUser getSysUserWithoutPwdByUsername(String username);

    SysUser getSysUserWithoutPwdByMail(String mail);

    SysUser getSysUserByUsername(String username);

    /**
     * 通过注册邮箱查询用户基础信息
     */
    SysUser getSysUserByMail(String mail);

    PagedGridResult queryAllSysUserMainInfoByPage(Integer page, Integer pageSize, String usernameOrNick);

    int addUser(SimpleUserBO simpleUserBO, String sessionUser);

    int updateSysUserRoleStatus(String username, String roleCode, String status);

    int deleteSysUserByUsername(String username);

    PagedGridResult getOnlineUserByPage(Integer page,Integer pageSize);

    int updateMyUserInfo(SysUserBasicInfoBO basicInfoBO, String sessionUser);

    SysSimpleUserVO getMySimpleUserInfo(String username);

    int updateMyPassword(String sessionUser, String newPassword);

    int userRegister(String email, String username, String password, SysUserSource source, SysUserRegistDTO sysUserRegistDTO);

    List<SysUser> getAllUsername();
}
